package com.chinairi.mall.controller;


import com.chinairi.common.utils.ResponseUtil;
import com.chinairi.mall.controller.viewobject.UserCompanyInfoVO;
import com.chinairi.mall.service.IUserCompanyTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.chinairi.common.controller.BaseController;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Webgasd
 * @since 2020-09-25
 */
@RestController
@RequestMapping("/user-company-type")
public class UserCompanyTypeController extends BaseController {

    @Autowired
    private IUserCompanyTypeService iUserCompanyTypeService;

    /**
     * 批量审核企业资质
     * @param userCompanyInfoVO
     * @throws IOException
     */
    @PostMapping("/batchUpdate")
    public void batchUpdate(@RequestBody UserCompanyInfoVO userCompanyInfoVO) throws IOException {
        iUserCompanyTypeService.batchUpdate(userCompanyInfoVO.getUserCompanyTypeList());
        ResponseUtil.showMessage("success", "批量审核成功", null);
    }
}
